package routers

import (
	"github.com/gin-gonic/gin"
	"week_one/client/api"
	jwtRequest "week_one/client/vender/jwt"
)

func UserRouter(Router *gin.RouterGroup) {
	Router.GET("health", func(context *gin.Context) {})
	user := Router.Group("user")
	{
		user.POST("register", api.Register)
		user.POST("login", api.UserLogin)
		//解析token中间件
		user.Use(jwtRequest.ParseToken())
		user.GET("im", api.Im)
	}
}
